<%// 二次确认通用按钮 %>
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'${button.icon!}',plain:true" onclick="eova_btn_${button.id}()">${button.name!}</a>
<script type="text/javascript">
	var eova_btn_${button.id} = function(){
		var $widget = $('#${gridId}');
        var rows = $.getWidgetSelections($widget);
        if (rows.length == "0") {
        	$.slideMsg("请选择一条记录！");
            return;
        }
	    
	    $.messager.confirm("${button.title!'系统提示'}", "${button.title!'您确认执行当前操作？'}", function(ok) {
			if (ok) {
				var json = JSON.stringify(rows);
				$.syncPost('${button.bs}', {
					rows : json
				}, function(result, status) {
					if (result.success) {
						$.slideMsg("操作完成！");
						$.widgetReLoad($widget);
					} else {
						$.alert($, result.msg);
					}
				});
				$.widgetClearSelections($widget);
			}
		});
	};
</script>